lis=[11,22,33,44,55,66,77,88,99]
b=-1
n=len(lis)
key=33
def search (findNum,start,end,lis=list):
    global b
    if(start<end):
        m = (start+end)//2
        if lis[m]==findNum:
            b=m
        elif lis[m] < findNum:
            search(findNum,m+1,end,lis)
        elif lis[m] > findNum:
            search(findNum,start,m-1,lis)
    return b
    
print(search(33,0,len(lis)-1,lis))

i,j=0,n-1
while i<j:
    m = (i+j)//2
    if lis[m]==key:
        b = m
        break
    elif lis[m] < key:
        i=m+1
    elif lis[m] > key:
        j=m-1
if b==-1:
    print('不存在')
else:
    print(b)